﻿<ui:WindowBase x:Class="WcfClientGenerator.UI.MainWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ui="clr-namespace:Addins.UI.Windows;assembly=Addins.UI"
             xmlns:vwm="clr-namespace:WcfClientGenerator.UI.ViewModel"
             xmlns:vw="clr-namespace:WcfClientGenerator.UI.View"
             xmlns:model="clr-namespace:WcfClientGenerator.Model.Config;assembly=WcfClientGenerator.Model"
             xmlns:ctl="clr-namespace:WcfClientGenerator.UI.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="320" d:DesignWidth="400" 
             Height="320" Width="400" 
             TextOptions.TextFormattingMode="Display"
             TextOptions.TextRenderingMode="ClearType"
             WindowStartupLocation="CenterScreen"
             Style="{DynamicResource noBorderWindowStyle}">
    <ui:WindowBase.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/WcfClientGenerator.UI;component/Resources/common.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </ui:WindowBase.Resources>

    <Grid>
        <Border BorderBrush="Transparent" BorderThickness="0" Margin="10">
            <Border.Effect>
                <DropShadowEffect BlurRadius="10" ShadowDepth="5" />
            </Border.Effect>

            <Grid x:Name="grdRoot" Style="{StaticResource rootLayoutStyle}"
                Margin="0,4,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                
                <Border BorderThickness="0" CornerRadius="5" BorderBrush="Black"/>
                
                <Rectangle
                    x:Name="caption"
                    Grid.Row="0"
                    Style="{DynamicResource captionRectangleStyle}" />
                <TextBlock
                    x:Name="txtTitle"
                    Grid.Row="0"
                    Style="{DynamicResource titleStyle}"
                    Text="WCF Client Generator" />
                <vw:ConfigurationsView 
                    x:Name="vwConfigurations" 
                    Grid.Row="1" 
                    Margin="8,0,8,0"/>
                <StackPanel x:Name="pnlCommands" Grid.Row="2" HorizontalAlignment="Center" Margin="4" Orientation="Horizontal" >
                    <Grid Margin="4,4,4,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ctl:ImageButton x:Name="btnGenerate" 
                    Margin="0,0,0,2" 
                    HorizontalAlignment="Center"
                    Command="{Binding Path=GenerateCommand}"
                    ToolTip="Generate"
                    Style="{DynamicResource roundButtonStyle}"
                    NormalImage="/WcfClientGenerator.UI;component/Images/play_black.png"
                    HoverImage="/WcfClientGenerator.UI;component/Images/play_white.png"
                    PressedImage="/WcfClientGenerator.UI;component/Images/play_darkgrey.png"
                    DisabledImage="/WcfClientGenerator.UI;component/Images/play_grey.png" />
                        <TextBlock 
                    Grid.Row="1"
                    Style="{DynamicResource buttonLabelStyle}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Text="Generate" />
                    </Grid>
                    <Grid Margin="4,4,4,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ctl:ImageButton x:Name="btnConfigure" 
                    Margin="0,0,0,2" 
                    HorizontalAlignment="Center"
                    Command="{Binding Path=EditConfigurationCommand}"
                    ToolTip="Configure" 
                    Style="{DynamicResource roundButtonStyle}"
                    NormalImage="/WcfClientGenerator.UI;component/Images/settings_black.png" 
                    HoverImage="/WcfClientGenerator.UI;component/Images/settings_white.png" 
                    PressedImage="/WcfClientGenerator.UI;component/Images/settings_darkgrey.png" 
                    DisabledImage="/WcfClientGenerator.UI;component/Images/settings_grey.png" />
                        <TextBlock 
                    Grid.Row="1"
                    Style="{DynamicResource buttonLabelStyle}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Text="Configure" />
                    </Grid>
                    <Grid Margin="4,4,4,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ctl:ImageButton x:Name="btnClose" 
                    Margin="0,0,0,2" 
                    HorizontalAlignment="Center"
                    ToolTip="Close" 
                    Command="{Binding Path=CloseCommand}"
                    Style="{DynamicResource roundButtonStyle}"
                    NormalImage="/WcfClientGenerator.UI;component/Images/cancel_black.png" 
                    HoverImage="/WcfClientGenerator.UI;component/Images/cancel_white.png" 
                    PressedImage="/WcfClientGenerator.UI;component/Images/cancel_darkgrey.png" 
                    DisabledImage="/WcfClientGenerator.UI;component/Images/cancel_grey.png" />
                        <TextBlock 
                    Grid.Row="1"
                    Style="{DynamicResource buttonLabelStyle}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Text="Close" />
                    </Grid>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</ui:WindowBase>
